<style>
    .bordertop{border: 0;margin-top: 0;padding-top: 0;height: 3.8rem;line-height: 3.8rem;display: inline-block;width: 100%;font-size: 1.2rem;color: #000;text-decoration: none;text-align: center;  }
</style>
<div id="listOfWinners">
    <div class="heading">
        <a href="#"><img src="resource/images/img-17-8.jpg" /> </a>
        中奖名单
    </div>
    <ul class="lottery">
        <?php  if(!empty($output['lottery_list']) && is_array($output['lottery_list'])){ ?>
            <?php foreach($output['lottery_list'] as $k=>$v) { ?>
        <li>
            <span class="num"><?php echo $v['lottery_ym']; ?></span>
            <span class="name">获奖用户：<?php echo $v['nickname']; ?></span>
            <a href="index.php?act=bargain_pk&op=history_pklist&time=<?php echo $v['lottery_ym']; ?>" class="details">查看详情</a>
        </li>
         <?php  }?>
         <?php  } ?>
    </ul>
    <?php if($output['TotalNum']<=$output['TotalPage']){?>
        <a class="bordertop" onclick="loadpage();">查看更多</a>
    <?php } ?>
    <footer></footer>






</div>
<script>
    var allNum = <?php echo $output['TotalNum']; ?>,
        allPage = <?php echo $output['TotalPage']; ?>,
        curPage = 1;

    var is_scroll = true;
    //ajax加载数据
    function loadpage() {
        if(!is_scroll){
            return;
        }
        if (curPage < allPage) {
            curPage += 1;
        } else {
            $('.bordertop').text('没有更多了!');
            return;
        }

        $.get(location.href, {isajax:1,curpage:curPage},function(data){
            if(data){
                $(".lottery").append(data);
            }
        });
    }

</script>

